

# import numpy as np
# a=np.array([1,2,3,4])
# b=a/30
# print(b[2])

'''
测试minmaxscale
'''
# import pymysql
# import pandas as pd
# import numpy as np
# from sklearn.preprocessing import MinMaxScaler
# list_feature = ['company', 'consume', 'capital', 'house_price','employees','population']
# num_inputs=len(list_feature)
# feature_y="GDP"
# distinct="data_pudong"

# db = pymysql.connect(host="localhost",port=3306, user="app_user",password="123456", database="smart_cim")
# sql = 'select * from ' + distinct
# dataframes = pd.read_sql(sql, db)
# dataframe = dataframes[list_feature]
# dataY = dataframes[feature_y]
# datasets = dataframe.values
# dataY =dataY.values
# dataset = datasets.astype('float32')
# scalerX = MinMaxScaler(feature_range=(0, 1))
# dataset = scalerX.fit_transform(dataset)

# print(scalerX.scale_)
# print(scalerX.min_/scalerX.scale_)
'''
测试numpy 相加
'''

import numpy as np

a=np.array([[1,2,3,4,6]])
b=np.array([1,2,3,4,5])

print(a+b)

'''
author: ytc
description: 10%优化比例优化结果
return {*}
'''
#init gdp 23.61
# sucess
# rate_cur:  0.8333333333333334
# opt_number:  [[4.05834739e+05 1.00599488e+03 5.80820213e+04 9.98645690e+04
#   1.99211780e+02 3.21413560e+02]]
# tag:  23.808903
# sucess
# rate_cur:  1.6666666666666667
# opt_number:  [[4.18125917e+05 1.02558144e+03 5.94573113e+04 1.00900888e+05
#   2.01057727e+02 3.22596280e+02]]
# tag:  24.007914
# sucess
# rate_cur:  2.5
# opt_number:  [[4.24755997e+05 1.04785678e+03 6.09490280e+04 1.01908107e+05
#   2.03285593e+02 3.24164440e+02]]
# tag:  24.201862
# sucess
# rate_cur:  3.3333333333333335
# opt_number:  [[4.35133337e+05 1.06989166e+03 6.19415653e+04 1.02329411e+05
#   2.05540947e+02 3.26137180e+02]]
# tag:  24.397692
# sucess
# rate_cur:  4.166666666666666
# opt_number:  [[4.41743313e+05 1.10116239e+03 6.24989580e+04 1.03128150e+05
#   2.09229947e+02 3.27671680e+02]]
# tag:  24.59446
# sucess
# rate_cur:  5.0
# opt_number:  [[4.51931683e+05 1.12506630e+03 6.31043767e+04 1.04187923e+05
#   2.10294693e+02 3.29299240e+02]]
# tag:  24.790977
# sucess
# rate_cur:  5.833333333333333
# opt_number:  [[4.64624927e+05 1.14804116e+03 6.41856893e+04 1.04770798e+05
#   2.11417307e+02 3.30951880e+02]]
# tag:  24.988304
# sucess
# rate_cur:  6.666666666666667
# opt_number:  [[4.74612263e+05 1.16337595e+03 6.50123187e+04 1.05509599e+05
#   2.13342820e+02 3.33111400e+02]]
# tag:  25.185034
# sucess
# rate_cur:  7.5
# opt_number:  [[4.80176866e+05 1.18839472e+03 6.57472620e+04 1.06535060e+05
#   2.15110647e+02 3.35202280e+02]]
# tag:  25.38267
# sucess
# rate_cur:  8.333333333333332
# opt_number:  [[4.87856339e+05 1.21240793e+03 6.64683797e+04 1.07394606e+05
#   2.16610840e+02 3.37234420e+02]]
# tag:  25.578478
# sucess
# rate_cur:  9.166666666666666
# opt_number:  [[4.96557062e+05 1.23916457e+03 6.71531140e+04 1.08554276e+05
#   2.16884260e+02 3.38982760e+02]]
# tag:  25.775988
# sucess
# rate_cur:  10.0
# opt_number:  [[5.05583459e+05 1.27625006e+03 6.81980433e+04 1.09106314e+05
#   2.17843400e+02 3.40527160e+02]]
# tag:  25.972807